package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_GCM_UNITSTRUCT"
 *     
*/
public class CcpGcmUnitstruct implements Serializable {

    /** identifier field */
    private String unitGuid;

    /** persistent field */
    private String unitLabel;

    /** persistent field */
    private String name;

    /** persistent field */
    private String mdGuid;

    /** persistent field */
    private String nullFlag;

    /** persistent field */
    private String unitOrder;

    /** persistent field */
    private String msgcatGuid;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public CcpGcmUnitstruct(String unitGuid, String unitLabel, String name, String mdGuid, String nullFlag, String unitOrder, String msgcatGuid, String reserved1, String reserved2, String reserved3) {
        this.unitGuid = unitGuid;
        this.unitLabel = unitLabel;
        this.name = name;
        this.mdGuid = mdGuid;
        this.nullFlag = nullFlag;
        this.unitOrder = unitOrder;
        this.msgcatGuid = msgcatGuid;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public CcpGcmUnitstruct() {
    }

    /** minimal constructor */
    public CcpGcmUnitstruct(String unitGuid, String unitLabel, String name, String mdGuid, String nullFlag, String unitOrder, String msgcatGuid) {
        this.unitGuid = unitGuid;
        this.unitLabel = unitLabel;
        this.name = name;
        this.mdGuid = mdGuid;
        this.nullFlag = nullFlag;
        this.unitOrder = unitOrder;
        this.msgcatGuid = msgcatGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="UNIT_GUID"
     *         
     */
    public String getUnitGuid() {
        return this.unitGuid;
    }

    public void setUnitGuid(String unitGuid) {
        this.unitGuid = unitGuid;
    }

    /** 
     *            @hibernate.property
     *             column="UNIT_LABEL"
     *             length="20"
     *             not-null="true"
     *         
     */
    public String getUnitLabel() {
        return this.unitLabel;
    }

    public void setUnitLabel(String unitLabel) {
        this.unitLabel = unitLabel;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="MD_GUID"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getMdGuid() {
        return this.mdGuid;
    }

    public void setMdGuid(String mdGuid) {
        this.mdGuid = mdGuid;
    }

    /** 
     *            @hibernate.property
     *             column="NULL_FLAG"
     *             length="1"
     *             not-null="true"
     *         
     */
    public String getNullFlag() {
        return this.nullFlag;
    }

    public void setNullFlag(String nullFlag) {
        this.nullFlag = nullFlag;
    }

    /** 
     *            @hibernate.property
     *             column="UNIT_ORDER"
     *             length="10"
     *             not-null="true"
     *         
     */
    public String getUnitOrder() {
        return this.unitOrder;
    }

    public void setUnitOrder(String unitOrder) {
        this.unitOrder = unitOrder;
    }

    /** 
     *            @hibernate.property
     *             column="MSGCAT_GUID"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getMsgcatGuid() {
        return this.msgcatGuid;
    }

    public void setMsgcatGuid(String msgcatGuid) {
        this.msgcatGuid = msgcatGuid;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="50"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="100"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("unitGuid", getUnitGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpGcmUnitstruct) ) return false;
        CcpGcmUnitstruct castOther = (CcpGcmUnitstruct) other;
        return new EqualsBuilder()
            .append(this.getUnitGuid(), castOther.getUnitGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getUnitGuid())
            .toHashCode();
    }

}
